Skip to content

KIP22 - P2MR ScriptPublicKey for quantum resistance#37

Open
ezrasisk wants to merge 2 commits intokaspanet:masterfrom
ezrasisk:master
Open

KIP22 - P2MR ScriptPublicKey for quantum resistance#37
ezrasisk wants to merge 2 commits intokaspanet:masterfrom
ezrasisk:master

Conversation

@ezrasisk
Copy link
Copy Markdown

@ezrasisk ezrasisk commented Mar 6, 2026

Introduce a new ScriptPublicKey versioning for P2MR that enhances quantum resistance and MAST functionality with minimal consensus changes. See 'files changed' for details.

Introduce a new ScriptPublicKey version for P2MR that enhances quantum resistance and MAST functionality with minimal consensus changes.
@ezrasisk ezrasisk changed the title Add P2MR ScriptPublicKey for quantum resistance KIP22 - Add P2MR ScriptPublicKey for quantum resistance Mar 6, 2026
@ezrasisk ezrasisk changed the title KIP22 - Add P2MR ScriptPublicKey for quantum resistance KIP22 - P2MR ScriptPublicKey for quantum resistance Mar 6, 2026
@ezrasisk
Copy link
Copy Markdown
Author

ezrasisk commented Mar 7, 2026

Some considerations regarding compatibility ensurances.

kip10 vs 22. These may conflict where p2mr scripts using kip10 opcodes require more data in the transaction witness element due to potentially larger mass demands.

kip5 vs 22. A p2mr address hides public keys. Standard kip5 tools would fail to verify signatures from these addresses because they do not handle merkle proof logic currently, necessitating an extended message signing spec.

kip17 vs 22. If merkle leaf execution is not fully compatible with state transitions for assets, if the execution environments differ from standard p2sh or p2pkh used by 17, conscripted assets may get stuck in p2mr asset data logic gaps.

kip14 vs 22. Slightly more computational expense is needed than standard sig verification because of the hashing reconstruction of merkle trees, which might hinder block propagation. There are perhaps several solutions to this one: Skip tagged as valid transactions that arrive after initial verifications present within the mempool; Multithreaded merkle proof verification to thread pools without awaiting additional transaction data; The mass scaling for naturally computationally costlier transactions assigned to these p2mr transactions helps ensure timely safety window closure; To prevent deep comp-dos attacks, max depth restraints guarantee tolerable worst case scenario performance rendered predictable.

@ezrasisk
Copy link
Copy Markdown
Author

ezrasisk commented Mar 7, 2026

here are some python prototypes: https://github.com/ezrasisk/Pay2MerkleRoot-examples.py

@someone235
Copy link
Copy Markdown
Contributor

We can simulate MAST using covenants, so I don't see this issue as very pressing.

@ezrasisk
Copy link
Copy Markdown
Author

I would not like to appear to be barking at the wind - so to speak - but, how I understand the simulations achieved by covenants (essentially with kip20) is that by using commit to hash covenants imbued with further logic. I may be wrong here - because perhaps someone could craft up some remedy - in thinking unwrapping larger "semi-native" MASTs is costlier and less private preserving (bcs the unwrapped/spent script gets entirely revealed.) The differences being unhidden contract structure and script mass limitations.

Statefulness can be used to solve many a problem; for sure, not very pressing and it is inlike, an affine promulgation afterall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants